package cn.yunhe.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

public class Permission implements Serializable{
    private int pid;
    private String pname;
    private int pflag;

    private Set<Role>roleSet=new HashSet<>();

    public Permission() {
    }

    public Permission(String pname) {
        this.pname = pname;
    }

    public Permission(int pid, String pname, int pflag, Set<Role> roleSet) {
        this.pid = pid;
        this.pname = pname;
        this.pflag = pflag;
        this.roleSet = roleSet;
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public String getPname() {
        return pname;
    }

    public int getPflag() {
        return pflag;
    }

    public void setPflag(int pflag) {
        this.pflag = pflag;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public Set<Role> getRoleSet() {
        return roleSet;
    }

    public void setRoleSet(Set<Role> roleSet) {
        this.roleSet = roleSet;
    }
}
